#ifndef WIDGET_H
#define WIDGET_H

#include <QWidget>
#include <QNetworkAccessManager>
#include <QNetworkReply>
#include <QNetworkRequest>
#include <QFile>

namespace Ui {
    class Widget;
}

class Widget : public QWidget
{
    Q_OBJECT

public:
    explicit Widget(QWidget* parent = nullptr);
    ~Widget();

    QNetworkAccessManager* manager;
    QNetworkReply* reply;
    QFile* myfile;

    void Init();

    void doProcessReadyRead();
    void doProcessFinished();
    void doProcessDownloadProgress(qint64, qint64);
    void doProcessError(QNetworkReply::NetworkError code);
private slots:
    void on_pushButton_clicked();

private:
    Ui::Widget* ui;
};

class widget
{
};

#endif // WIDGET_H
